package org.kth.dks.util;

public class CommunicationInfo {
    public int bytesReceived;
    public int msgsReceived;
    public int bytesSent;
    public int msgsDelivered;
    public int msgsUnacked;
    public int msgsFailed;
    public int establishedConnections;
    public int totalConnections;

    public CommunicationInfo(int br, int mr, int bs, int md, int mu, int mf, int c, int tc){
	bytesReceived          = br;
	msgsReceived           = mr;
	bytesSent              = bs;
	msgsDelivered          = md;
	msgsUnacked            = mu;
	msgsFailed             = mf;
	establishedConnections = c;
    totalConnections       = tc;
    }

    public String toString() {
      return
          " Bytes Received          : "+bytesReceived+"\n"+
          " Msgs Received           : "+msgsReceived+"\n"+
          " Bytes Sent              : "+bytesSent+"\n"+
          " Msgs Delivered          : "+msgsDelivered+"\n"+
          " Msgs Unacked            : "+msgsUnacked+"\n"+
          " Msgs Failed             : "+msgsFailed+"\n"+
          " Established Connections : "+establishedConnections+"\n"+
          " Total Connections       : "+totalConnections+"\n";
    }
}
